<!--#include $webdir + "/inc_top.tmpl"#-->
<form action="./two" method="post" autocomplete="off">
    <div class="container">
        <div id="inner">
            <div id="content" class="bigger">
                <div id="rightGreyText">$T('wizard-version') $version</div>
                <h1>$T('wizard-quickstart')</h1>
                <hr />
                <script type="text/javascript">
                    var txtChecking = "$T('srv-testing')";
                    <!--#include raw $webdir + "/static/javascript/checkserver.js"#-->
                </script>
                <h3>$T('wizard-server')</h3>
                $T('wizard-explain-server')<br />

                <br /><br />

                <input type="hidden" name="server" value="$server" />

                <div class="row">
                    <div class="col-md-7 form-horizontal">
                        <div class="form-group">
                            <label for="host" class="col-sm-4 control-label">$T('srv-host')</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" name="host" id="host" value="$host" placeholder="$T('wizard-example') news.newshosting.com" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="username" class="col-sm-4 control-label">$T('srv-username')</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" name="username" id="username" value="$username" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="password" class="col-sm-4 control-label">$T('srv-password')</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" name="password" id="password" value="$password" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="ssl" class="col-sm-4 control-label">
                                 $T('srv-ssl')
                            </label>
                            <div class="col-sm-8 input-checkbox">
                                <input type="checkbox" id="ssl" name="ssl" value="1" <!--#if $ssl == 1 then 'checked' else ''#--> data-toggle="tooltip" data-placement="right" title="$T('wizard-server-ssl-explain')"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-4"></div>
                            <div class="col-sm-8">
                                <a href="#" class="wizard-advanced-settings" onclick="\$('#server-hidden-settings').removeClass('hidden');\$(this).parent().parent().hide()">
                                    <span class="glyphicon glyphicon-cog"></span> $T('button-advanced')
                                </a>
                            </div>
                        </div>
                        <div id="server-hidden-settings" class="hidden">
                            <div class="form-group">
                                <label for="port" class="col-sm-4 control-label">$T('srv-port')</label>
                                <div class="col-sm-8">
                                    <input type="number" class="form-control" name="port" id="port" value="<!--#if $port then $port else '563' #-->" min="0" max="65535" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="connections" class="col-sm-4 control-label">$T('srv-connections')</label>
                                <div class="col-sm-8">
                                    <input type="number" class="form-control" name="connections" id="connections" value="<!--#if $connections then $connections else '8'#-->" min="1" max="500" data-toggle="tooltip" data-placement="right" title="$T('wizard-server-con-explain') $T('wizard-server-con-eg')" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="ssl_verify" class="col-sm-4 control-label">$T('opt-ssl_verify')</label>
                                <div class="col-sm-8">
                                    <select name="ssl_verify" id="ssl_verify" class="form-control">
                                        <option value="2" <!--#if $ssl_verify == 2 then 'selected="selected"' else ""#--> >$T('ssl_verify-strict')</option>
                                        <option value="1" <!--#if $ssl_verify == 1 then 'selected="selected"' else ""#--> >$T('ssl_verify-normal')</option>
                                        <option value="0" <!--#if $ssl_verify == 0 then 'selected="selected"' else ""#--> >$T('ssl_verify-disabled')</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-4">
                                <button id="serverTest" class="btn btn-default"><span class="glyphicon glyphicon-sort"></span> $T('wizard-button-testServer')</button>
                            </div>
                            <div class="col-sm-8">
                                <div id="serverResponse" class="well well-sm">$T('wizard-server-text')</div>
                            </div>
                        </div>

                    </div>
                    <div class="col-md-5">
                        <div class="clearfix"></div>
                        <iframe style="float: right; width: 325px; height: 325px;" frameborder="0" src="https://sabnzbd.org/wizard#$active_lang"></iframe>
                    </div>
                </div>
                <input type="hidden" name="apikey" value="$apikey" />
            </div>
            <hr />
            <div class="row">
                <div class="col-xs-4 text-center">
                    <a class="btn btn-default" href="./index"><span class="glyphicon glyphicon-chevron-left"></span> $T('wizard-previous')</a>
                </div>
                <div class="col-xs-4 text-center">
                </div>
                <div class="col-xs-4 text-center">
                    <button class="btn btn-default" id="next-button">$T('wizard-next') <span class="glyphicon glyphicon-chevron-right"></span></button>
                </div>
            </div>
        </div>
    </div>
</form>
<!--#include $webdir + "/inc_bottom.tmpl"#-->
